<?php
include_once 'classes/Campaign.php';
class V_Campaign{
	var $Campaign;
	function V_Campaign($campaign){

		$this->Campaign = $campaign;
		$this->DisplayForm();
	}
	function DisplayForm(){
		//$this->Campaign = new Campaign();
		$image_front = $this->Campaign->getImage("image_front");
		$finish_time = $this->Campaign->date_finish;
		$brand_id = $this->Campaign->brand_id;
		?>
<div class="campaign">
<div class="campaign_layer">
<div class="campaign_layer_bg"></div>
<div class="rel">
<div class="campaign_link">
<a href="kampanya.php?brand_id=<?php echo $brand_id?>"><img
	src="images/alisverise_katil.png" style="_padding-top: 600px;"></a></div>
<table class="campaign_text">
	<tbody>
		<tr>
		<td>
			<span class='white'> Kampanyanın bitmesine</span>
			
			<?php 
          	$d = DateTime::createFromFormat("Y-m-d H:i:s", $finish_time ." 05:00:00",new DateTimeZone("UTC"));
			$RD =  $d->format("m/d/Y H:i A");
			echo "<script language='JavaScript'>";
			echo "TargetDate='". $RD. "';";
			echo "CountActive = true;";
			echo "CountStepper = -1;";
			echo "LeadingZero = true;";
			echo "IsSpan = true;";
			echo "Brand = ". $brand_id .";";
			echo "DisplayFormat ='<strong><span class='d'>%%D%% </span> gün <span class='h'>%%H%% </span>: <span class='m'>%%M%% </span> : <span class='s'>%%S%% </span></strong>"."';";
			echo "FinishMessage = 'Kampanya sona ermiştir.'";
			echo "</script>";
          ?>
			
<script language="JavaScript" src="http://localhost/infophp/includes/counter.js"></script>
			
			</td>
		</tr>
	</tbody>
</table>
</div>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tbody>
		<tr>
			<td colspan="3"><img width="626" src="images/campaign_t.png"
				style="_padding-top: 600px;"></td>
		</tr>
		<tr>
			<td class="campaign_l"></td>
			<td>
			<a href="kampanya.php?brand_id=<?php echo $brand_id?>"><img src="media/campaign/<?php echo $image_front?>" style="_padding-top:600px;"></a>

			</td>
			<td class="campaign_r"> </td>
		</tr>
		<tr>
			<td colspan="3"><img width="626" src="images/campaign_b.png"
				style="_padding-top: 600px;"></td>
		</tr>
	</tbody>
</table>
</div>
		<?php
	}

}
?>